<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      //单个条件筛选
      let arr = [
        { a: '苹果', b: '桃子', c: '吃' },
        { a: '香蕉', b: '面包', c: '不吃' },
        { a: '香蕉', b: '苹果', c: '吃' },
        { a: '苹果', b: '菠萝', c: '不吃' }
      ]
      console.log(arr.filter(item => item.a === '苹果'))
      //[{a:'苹果',b:'桃子',c:'吃'},{a:'苹果',b:'菠萝',c:'不吃'}]
    </script>
  </body>
</html>
